<scenario name="TSCP1">

	<!-- ***************** -->
	<!--     ENDPOINTS     -->
	<!-- ***************** -->

	<!-- Curtis: green -->
	<endpoint id="curtis_pap" color="green" />
	<endpoint id="curtis_pr" type="policyrepository" color="green" />
	<endpoint id="curtis_sharepoint" sharePoint="true" type="datastorage" color="green" >
		<!-- Sync -->
		<sync syncId="cloud_sharepoint" />
		<!-- Program Z labels -->
		<label labelId="programZ-highLevelDesign" policyPointer="policy-programZ-highLevelDesign@curtis_pr">
			<pdp pdpId="curtis_pdp" /> <!-- highLevelDesign only served by on-premise PDP -->
		</label>
		<label labelId="programZ-detailedDesign" policyPointer="policy-programZ-detailedDesign@curtis_pr">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<label labelId="programZ-simulationData" policyPointer="policy-programZ-simulationData@curtis_pr">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<!-- IP labels -->
		<label labelId="curtis-ip" policyPointer="curtis_dkal_pdp">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<label labelId="packard-ip" policyPointer="policy-packard-ip@packard_pr">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<label labelId="spad-ip" policyPointer="policy-spad-ip@spad_pr">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<!-- Documents -->
		<document documentId="doc-4985" content="The high level design is a client-server architecture as described in Figure 32 ..." >
			<label labelId="programZ-highLevelDesign" />
			<label labelId="curtis-ip" />
		</document>	
	</endpoint>
	<endpoint id="curtis_pdp" type="xacml" attributeRepositoryId="cloud_ar" color="green" />
	<endpoint id="curtis_dkal_pdp" type="xacml->dkal" dkalId="curtis_dkal" policyFile="curtis_common.dkal" color="green" /> 
	<endpoint id="curtis_dkal" type="dkal" xacml="basicTrust" pepId="curtis_dkal_pdp" policyId="curtis-ip" file="curtis_ip.dkal" color="green"   
		sql="connection_string.txt" />

	<!-- Packard: blue -->
	<endpoint id="packard_pap" color="blue" />
	<endpoint id="packard_pr" type="policyrepository" color="blue" />
	<endpoint id="packard_ar" type="attributerepository" color="blue" />
	
	<!-- Spad: purple -->
	<endpoint id="spad_pap" color="purple" />
	<endpoint id="spad_pr" type="policyrepository" color="purple" />
	<endpoint id="spad_ar" type="attributerepository" color="purple" />

	<!-- Cloud -->
	<endpoint id="cloud_sharepoint" sharePoint="true" type="datastorage" >
		<!-- Sync -->
		<sync syncId="curtis_sharepoint" />
		<!-- Program Z labels -->
		<label labelId="programZ-highLevelDesign" policyPointer="policy-programZ-highLevelDesign@curtis_pr">
			<pdp pdpId="curtis_pdp" /> <!-- highLevelDesign only served by on-premise PDP -->
		</label>
		<label labelId="programZ-detailedDesign" policyPointer="policy-programZ-detailedDesign@curtis_pr">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<label labelId="programZ-simulationData" policyPointer="policy-programZ-simulationData@curtis_pr">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<!-- IP labels -->
		<label labelId="curtis-ip" policyPointer="curtis_dkal_pdp">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<label labelId="packard-ip" policyPointer="policy-packard-ip@packard_pr">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<label labelId="spad-ip" policyPointer="policy-spad-ip@spad_pr">
			<pdp pdpId="curtis_pdp" />
			<pdp pdpId="cloud_pdp" />
		</label>
		<!-- Documents -->
		<document documentId="doc-4985" content="The high level design is a client-server architecture as described in Figure 32 ..." >
			<label labelId="programZ-highLevelDesign" />
			<label labelId="curtis-ip" />
		</document>
	</endpoint>
	<endpoint id="cloud_pdp" type="xacml" attributeRepositoryId="cloud_ar" />
	<endpoint id="cloud_ar" type="attributerepository" />

	<!-- Request makers -->
	<endpoint id="paula@packard" />
	<endpoint id="john@curtis" />
	<endpoint id="matt@packard" />
	
	<!-- **************** -->
	<!--     MESSAGES     -->
	<!-- **************** -->

	<!-- Curtis loads projectZ label policies (authored in XACML) -->
	<message from="curtis_pap" to="curtis_pr" type="xacmlPolicy" file="programZ_highLevelDesign.pcy" /> 
	<message from="curtis_pap" to="curtis_pr" type="xacmlPolicy" file="programZ_detailedDesign.pcy" /> 
	<message from="curtis_pap" to="curtis_pr" type="xacmlPolicy" file="programZ_simulationData.pcy" /> 

	<!-- Packard loads policy for its IP -->
	<message from="packard_pap" to="packard_pr" type="xacmlPolicy" file="packard_ip.pcy" /> 

	<!-- Spad loads policy for its IP -->
	<message from="spad_pap" to="spad_pr" type="xacmlPolicy" file="spad_ip.pcy" /> 
	
	<!-- Resource loading -->
	<message from="paula@packard" to="cloud_sharepoint" type="xacmlRequest" file="request1.req" />
	<sleep amount="750" />
	
	<!-- Resource requests -->
	<message from="john@curtis" to="curtis_sharepoint" type="xacmlRequest" file="request2.req" />
	<sleep amount="750" />
	<message from="matt@packard" to="cloud_sharepoint" type="xacmlRequest" file="request3.req" />
</scenario>
